<template>
    <h3>用户登录列表页面</h3>
    <table border="1">
        <thead>
            <tr>
                <td>账号ID</td>
                <td>账号</td>
                <td>密码</td>
                <td>注册时间</td>
            </tr>
        </thead>

        <tbody>
            <tr v-for="item in info">
                <td>{{item.UId}}</td>
                <td>{{item.UName}}</td>
                <td>{{(item.UPwd).substring(0,4)+"***"}}</td>
                <td>{{(item.UDate).substring(0,10)}}</td>
            </tr>
        </tbody>
    </table>
</template>



<script setup lang="ts">
import { ref,onMounted } from 'vue';
import axios from 'axios';


onMounted(()=>{
    Show()
})

const info=ref([{
    UId:0,
    UName:"",
    UPwd:"",
    UDate:""
}])

const Show=()=>{
   axios.get("http://localhost:2134/api/User/UserLogin",{
     
   })
   .then(res=>{
        info.value=res.data
   })

}
</script>